<?php session_start(); ?>
<?php
include('../ketnoi.php');
if (!$_SESSION['user']) header("location: index.php"); // nếu biến session['banguyen'] chưa có thì trở về trang đăng nhập, copy dòng này vào trang nào muốn bảo vệ bằng mật khẩu
?>
<script language="javascript">	
	var invalide_dt = 'Số điện thoại từ 8 đến 11 số';
	var invalide_email = 'Địa chỉ e-mail không đúng, xin mời bạn nhập lại';
	
	function validateForm( frm )
	{
		var RE_EMAIL = /^(\w+[\-\.])*\w+@(\w+\.)+[A-Za-z]+$/;
		
		if ( frm.txtDienThoai.value.length < 8 || frm.txtDienThoai.value.length > 11)
		{
			alert (invalide_dt);
			frm.txtDienThoai.focus();
			return false;
		}

		if ( !RE_EMAIL.test(frm.txtEmail.value) )
		{
			alert (invalide_email);
			frm.txtEmail.select();
			return false;
		}

	}
	function xoa(){
	 if (document.adminForm.boxchecked.value == 0){
		  alert('Please make a selection from the list to delete'); 
     } 
	 else if (confirm('Bạn có chắc muốn xóa không?')){ 
	      document.adminForm.submit();
     }

	}
	
	 function doi(){
	   if (!confirm('Bạn có chắc muốn thay đổi không?')){ 
          return false;
       }
	 }
	 
</script>
<style type="text/css">
<!--
.error, .success {padding:.8em; margin-bottom:.5em;border:2px solid #AAF;width:625px; text-align:center}
.error {background: #ECECFF;color: red;border-color:#AAF;}
.success {background: #ECECFF;color: #00F;border-color:#AAF;}
-->
.xem {
FONT-SIZE: 12px; 
	COLOR: #0000FF;
	font-weight: bold;
	background-color:#FFFFFF;
}
.xem a {
	color: #0000FF;
	text-decoration: none;
}
.xem a:link, a:visited {
	color: #0000FF;
	text-decoration: none;
}
.level_1_1 
{
	padding-left:10px;BORDER-RIGHT: #e5e5e5 1px solid;BORDER-BOTTOM: #e5e5e5 1px solid;HEIGHT: 25px;
}
.main_3 
{
	 padding-left:10px;BORDER-RIGHT: #e5e5e5 1px solid; FONT-WEIGHT: bold; BORDER-BOTTOM: #e5e5e5 1px solid; BACKGROUND-COLOR: #FFF; height:30px; color: #000
}

.main_4
{
	padding-left:20px;FONT-WEIGHT: bold; BORDER-BOTTOM: #999 1px solid; height:30px; color: #000; background: #F8F8F8;
}
</style>
<script type="text/javascript" src="script/common.js"></script>
<script type="text/javascript" src="script/viettyping.js"></script>
<script type="text/javascript" src="script/joomla.js"></script>

<script language="javascript">
            document.getElementById('txtKhoa').focus();
 </script> 
<script type="text/javascript" src="scripts/joomla.js"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script src="ckeditor/_samples/sample.js" type="text/javascript"></script>
<div class="m">
 <?php 
    $shop=$dulieu;
	if($_GET['action']=='view' && $_GET['option']=='com_student')
	{		
	    
		
?>
<div id="menu">
	<div style="float: right;">
	<div class="icon1">
<a  class="toolbar" href="index.php"><img src="images/toolbar/icon-32-cancel.png" alt="Remove"><br><span>Cancel</span></a>
	</div>
	</div>

	
	<div style="float: right;">
	<div class="icon1">
<a class="toolbar" href="?option=com_lichhoc&action=insert"><img src="images/toolbar/icon-32-new.png" alt="New"><br><span>New</span></a>
	</div>
	</div>
</div>

<div class="header" style="background: url(images/dashboard/icon-48-article.png) no-repeat scroll 0% 0% transparent; text-indent: 30px; line-height: 50px;">
  <h2 style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;Đăng ký</h2></div><br /><br />
<form name="adminForm" action="" method="post">
					
					<input name="option" value="com_lichhoc" type="hidden">
					<input name="boxchecked" type="hidden">
					<input name="task" value="" type="hidden">
					<input name="func" value="" type="hidden">
<table width="828" border="0" cellpadding="" cellspacing="3">
					   	<tr >
					   	
						<td width="488">Lịch khai giảng theo
                          <select name="trangthai" id="filter_state" class="inputbox" size="1" onchange="adminForm.submit();">
					  <option value="" selected="selected">- Chọn cơ sở-</option>
					      <?php
		$sql1 = "SELECT * FROM `".$shop."`.`coso` order by MaCS asc";
		$kq = mysql_query($sql1) or die ('khong tim thay du lieu');
		 while($tt = mysql_fetch_array($kq))
	     { 
	  ?>
					      <option value="<?php echo $tt['MaCS']?>"><?php echo $tt['TenCS']?></option>
					      <?php
	   }
					   ?>
					  </select></td>
                        <td width="6" align="right">&nbsp;</td>
						
				  	
					    <td width="322" valign="bottom"><select name="khoa" id="khoa" class="inputbox" size="1" onchange="adminForm.submit();">
					      <option value="" selected="selected">- Chọn khóa nghiệp vụ -</option>
					      <?php
		$sql1 = "SELECT * FROM `".$shop."`.`lophoc` order by MaLopHoc asc";
		$k = mysql_query($sql1) or die ('khong tim thay du lieu');
		 while($t = mysql_fetch_array($k))
	     { 
	  ?>
					      <option value="<?php echo $t['MaLopHoc']?>"><?php echo $t['TenLopHoc']?></option>
					      <?php
	   }
					   ?>
					      </select></td>
					   	</tr>
                        <tr>
<td colspan="3">&nbsp;
</td>
</tr>	 	
	</table>
    
 
  
 </form>
<?php
} ?>
</div>
